﻿//-----------------------------------------------------------------------
// <copyright file="Graphic.cs" company="WorldView Solutions Inc">
//     Copyright (c) WorldView Solutions Inc. This source is subject to the Microsoft Public License (Ms-PL). All other rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Xml;
using System.Xml.Serialization;
using WorldViewSolutions.Geometry;

namespace WorldViewSolutions.Graphics
{
    /// <summary>
    /// Defines how an object should be displayed on a map.
    /// </summary>
    /// <remarks></remarks>
	[Serializable]
	[XmlRoot("graphic")]
	public class Graphic
	{
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        /// <remarks></remarks>
		[XmlAttribute("name")]
		public string Name { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>The description.</value>
        /// <remarks></remarks>
		[XmlElement("description")]
		public string Description { get; set; }

        /// <summary>
        /// Gets or sets the geometry.
        /// </summary>
        /// <value>The geometry.</value>
        /// <remarks></remarks>
        [XmlElement("point", Type = typeof(Point)), XmlElement("polyline", typeof(Polyline)), XmlElement("polygon", typeof(Polygon)), XmlElement("envelope", typeof(Envelope))]
		public WorldViewSolutions.Geometry.Geometry Geometry { get; set; }

        /// <summary>
        /// Gets or sets the style.
        /// </summary>
        /// <value>The style.</value>
        /// <remarks></remarks>
		[XmlElement("style")]
		public Style Style { get; set; }
	}
}